package com.hspedu.tankgame3Exercise;

import javax.swing.*;

/**
 * @author DL5O
 * @version 1.0
 */
public class YwlTankGame extends JFrame {
    MyPanel mp = null;
    public static void main(String[] args) {
        YwlTankGame ywlTankGame = new YwlTankGame();
    }

    public YwlTankGame(){
        mp = new MyPanel();
        Thread thread_mp = new Thread(mp);
        thread_mp.setName("thread_mp");
        thread_mp.start();
        this.add(mp);
        this.setSize(1000,750);
        this.addKeyListener(mp);//
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        this.setVisible(true);
    }

}
